]> permondes.de Git - Analog_Engine.git/blame - scripts/TP1 09.27 Bead on Cycloid.LACE
Potential of charged sphere
[Analog_Engine.git] / scripts / TP1 09.27 Bead on Cycloid.LACE
CommitLineData
48debccd
P
1# A bead glides frictionless on a wire that has the shape of a cycloid
2# g is the gravitational acceleration 9,81 m/s²
3# a is the radius of the rolling circle (see Bronstein/Semendjajew p. 91)
4# equation of motion:
5# mu'' = - g/4a * mu, with mu = sin(phi/2) and phi a parameter of the cycloid
6
6d26a6bd
P
7alias coefficient.1 g/4a
8coefficient.2 (+1) -> mu0'
9coefficient.3 (-1) -> -mu0
10alias coefficient.4 4ax
11alias coefficient.5 4ay # same as 4ax
48debccd
P
12
13iintegrate mu'' -> -mu'
14 IC: mu0'
15iintegrate -mu' -> mu
16 IC: -mu0
17invert mu -> -mu
6d26a6bd
P
18coefficient.g/4a (-mu) -> -g/4a*mu
19assign -g/4a*mu -> mu''
48debccd
P
20
21# the following is for displaying the cycloid in x-y space
22# calculating x (NB: this includes some unacceptable approximations)
6d26a6bd
P
23coefficient.4ax (mu) -> 4a*mu
24output(4a*mu) -> out.x
48debccd
P
25
26# calculating y
56968557 27multiply mu, mu -> mu^2
6d26a6bd 28coefficient.4ay (mu^2) -> 4ay*mu^2
48debccd
P
29isum 4a*mu^2 -> -2a*mu^2 # just serves to devide by 2 because we need 2a instead of 4a
30 /2
56968557 31invert -2a*mu^2 -> 2a*mu^2
6d26a6bd 32output(2a*mu^2) -> out.y
48debccd
P
33
34# display mu, so the sinus
6d26a6bd 35output(mu) -> out.z